home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / util / misc / MUser17src.lha / MultiUser / src / Library / StdLibFunc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-07  |  2.2 KB  |  104 lines

  1. /************************************************************
  2. * MultiUser - MultiUser Task/File Support System                *
  3. * ---------------------------------------------------------    *
  4. * Standard Library Functions                                            *
  5. * ---------------------------------------------------------    *
  6. * © Copyright 1993-1994 Geert Uytterhoeven                        *
  7. * All Rights Reserved.                                                    *
  8. ************************************************************/
  9.  
  10.  
  11. #include <exec/execbase.h>
  12. #include <exec/semaphores.h>
  13. #include <exec/alerts.h>
  14. #include <exec/initializers.h>
  15. #include <proto/exec.h>
  16.  
  17. #include "Config.h"
  18. #include "LibHeader.h"
  19. #include "StdLibFunc.h"
  20. #include "Misc.h"
  21.  
  22.  
  23.     /*
  24.      *        Library initialisation
  25.      */
  26.  
  27. struct muBase __asm __saveds *muInit(register __d0 struct muBase *mubase,
  28.                                                  register __a0 BPTR seglist,
  29.                                                  register __a6 struct ExecBase *sysbase)
  30. {
  31.     SysBase = sysbase;
  32.     muBase = mubase;
  33.     muBase->LibNode.lib_Node.ln_Type = NT_LIBRARY;
  34.     muBase->LibNode.lib_Node.ln_Name = MultiUserName;
  35.     muBase->LibNode.lib_Flags = LIBF_SUMUSED|LIBF_CHANGED;
  36.     muBase->LibNode.lib_Version = MultiUserVersion;
  37.     muBase->LibNode.lib_Revision = MultiUserRevision;
  38.     muBase->LibNode.lib_IdString = MultiUserIDString;
  39.     muBase->SegList = seglist;
  40.  
  41.     if (!Init()) {
  42.         CleanUp();
  43.         FreeMem((APTR)((ULONG)muBase-(ULONG)(muBase->LibNode.lib_NegSize)),
  44.                   muBase->LibNode.lib_NegSize+muBase->LibNode.lib_PosSize);
  45.         return(NULL);
  46.     } else
  47.         return(mubase);
  48. }
  49.  
  50.  
  51.     /*
  52.      *        Library Open() (Called by OpenLibrary())
  53.      *
  54.      *        Standard Library Function
  55.      */
  56.  
  57. struct muBase __asm *muOpen(register __a6 struct muBase *muBase)
  58. {
  59.     muBase->LibNode.lib_OpenCnt++;
  60.     muBase->Flags &= -1-LIBF_DELEXP;
  61.     return(muBase);
  62. }
  63.  
  64.  
  65.     /*
  66.      *        Library Close() (Called by CloseLibrary())
  67.      *
  68.      *        Standard Library Function
  69.      *
  70.      *        The multiuser.library will NEVER be expunged!!
  71.      */
  72.  
  73. BPTR __asm muClose(register __a6 struct muBase *muBase)
  74. {
  75.     muBase->LibNode.lib_OpenCnt--;
  76.     return(NULL);
  77. }
  78.  
  79.  
  80.     /*
  81.      *        Library Expunge() (Called by RemLibrary())
  82.      *
  83.      *        Standard Library Function
  84.      *
  85.      *        The multiuser.library will NEVER be expunged!!
  86.      */
  87.  
  88. BPTR __asm muExpunge(void)
  89. {
  90.     return(NULL);
  91. }
  92.  
  93.  
  94.     /*
  95.      *        Library ExtFunc() (Called by ??)
  96.      *
  97.      *        Standard Library Function
  98.      */
  99.  
  100. ULONG __asm muExtFunc(void)
  101. {
  102.     return(NULL);
  103. }
  104.